//
//  RecordDownloader.h
//  CET
//
//  Created by Kai on 8/27/10.
//  Copyright 2010 NONAME STUDIO. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol  RecordDownloaderDelegate

- (void)recordDidDownload:(NSIndexPath *)indexPath;

@end


@class CETRecord;

@interface RecordDownloader : NSObject {

	id <RecordDownloaderDelegate> delegate;
	
	CETRecord *cetRecord;
	NSIndexPath *indexPathInTableView;
	
	NSMutableData *activeDownload;
    NSURLConnection *recordConnection;
	
	BOOL didFinishLoading;
}

@property (nonatomic, assign) id <RecordDownloaderDelegate> delegate;

@property (nonatomic, retain) CETRecord *cetRecord;
@property (nonatomic, retain) NSIndexPath *indexPathInTableView;

@property (nonatomic, retain) NSMutableData *activeDownload;
@property (nonatomic, retain) NSURLConnection *recordConnection;

@property (nonatomic) BOOL didFinishLoading;

- (id)initWithAdmissionCard:(NSString *)card;

- (void)startDownload;
- (void)cancelDownload;

@end
